class HomesController < ApplicationController
  # GET /homes
  # GET /homes.json
  def index

    #@categories = Category.find(:all, include: :products);
    #@productsBanner = Product.where("active = true and highlight = true")
    @produtosDestaque = Produto.where("ativo = true and destaque = true").limit 6

    respond_to do |format|
      format.html # index.html.erb
      format.json { render json: @homes }
    end
  end
  
  def index2

    @categories = Category.find(:all, include: :products);
    @productsBanner = Product.where("active = true and highlight = true")
    @productsVitrine = Product.where("active = true and vitrine = true")

    respond_to do |format|
      format.html # index.html.erb
      format.json { render json: @homes }
    end
  end
end
